function saveMat( filename,A)

fid = fopen( filename,'wb');

try
    m = size(A,2); fwrite(fid, m,'int32');
    n = size(A,1); fwrite(fid, n,'int32');  
    fwrite(fid, A,'float32');
catch
    
end

fclose(fid);

